<template>
  <!--<div id="allmap" style="width: 100%; height: {{mapHeight}}px"></div>-->
  <!--<div id="allmap":style="{width: '100%', height: mapHeight + 'px'}"></div>-->
  <div id="allmap">
  </div>
</template>
<script>
import BMap from 'BMap'
export default {
  // 22.8269166520,108.3460443682
  mounted () {
    var map = new BMap.Map('allmap')
    var point = new BMap.Point(108.3460443682, 22.8269166520)
    map.centerAndZoom(point, 14)

    var marker = new BMap.Marker(point) // 创建标注
    map.addOverlay(marker) // 将标注添加到地图中

    var label = new BMap.Label('<div>qwer</div>', {offset: new BMap.Size(0, 20)})
    label.setStyle({ color: 'blue', fontSize: '12px' })
    label.setContent('sdfsf')
    marker.setLabel(label)
  }
}
</script>

<style scoped>
#allmap{
  width: 100vw;
  height: 50vw;
}
</style>
